package com.finance.system.controller;

import com.finance.framework.controller.BaseController;
import com.finance.report.service.ITimerManSalaryService;
import com.finance.util.DateUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.Calendar;
import java.util.Date;

/**
 * @Author: gly
 * @Date: Created in 2017-05-27
 */
@Controller
@RequestMapping("/mansalary/export")
public class TestController extends BaseController {
    @Resource
    private ITimerManSalaryService timerManSalaryService;
    @RequestMapping("/detail")
    public void  test(){
        Calendar calendar=Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.add(Calendar.MONTH,-1);
        String month= DateUtil.dateFormat(calendar.getTime(),"yyyy-MM");
        timerManSalaryService.upload(month);
    }

}
